  mazePath(arr) {
    let array = [];
    let size = arr.length;
    for (let n = 0, m = size - 1; n <= m; n++, m--) {
      // 上边：从左到右
      for (let a = n; a <= m; a++) array.push(arr[n][a]);
      // 右边：从上到下（跳过已添加的角）
      for (let b = n + 1; b <= m; b++) array.push(arr[b][m]);
      // 下边：从右到左（避免单行重复）
      if (n !== m) for (let c = m - 1; c >= n; c--) array.push(arr[m][c]);
      // 左边：从下到上（跳过已添加的角）
      if (n !== m) for (let d = m - 1; d > n; d--) array.push(arr[d][n]);
    }
    return array;
  },
  moveHandler() {
    let step = (this.element.gameStep.value = this.getStep(this.gameData.step));
    this.gameData.curPos += step;
    document.querySelector(".container .active")?.classList.remove("active");
    if (this.gameData.curPos < this.gameData.pathArr.length - 1) {
      const li = document.querySelector(
        `li[data-index="${this.gameData.pathArr[this.gameData.curPos]}"]`
      );
      li.classList.add("active");
      if (li.classList.contains("angel") || li.classList.contains("dragon"))
        this.bloodCalculator(li);
    } else {
      document.querySelector('li[data-index="end"]').classList.add("active");
      this.tipRender("success");
    }
  },